package com.xique.door.bean.domain;


import com.xique.common.core.annotation.Excel;
import com.xique.common.core.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 命令下发异常--每个设备编号+命令字只有一条记录对象 t_command_error_log
 * 
 * @author ww
 * @date 2020-09-24
 */
public class CommandErrorLog extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键id */
    private Long id;

    /** 设备编号 */
    @Excel(name = "设备编号")
    private String deviceCode;

    /** 下发的数据包 */
    @Excel(name = "下发的数据包")
    private String data;

    /** 命令下发状态：1首次下发失败；2重发失败 */
    @Excel(name = "命令下发状态：1首次下发失败；2重发失败")
    private String status;

    /** 命令下发失败原因：1-API接口内部错误；2-设备离线；3-下发成功，应答失败 */
    @Excel(name = "命令下发失败原因：1-API接口内部错误；2-设备离线；3-下发成功，应答失败")
    private String errorReason;

    /** 重发次数 */
    @Excel(name = "重发次数")
    private Long retryCnt;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setDeviceCode(String deviceCode) 
    {
        this.deviceCode = deviceCode;
    }

    public String getDeviceCode() 
    {
        return deviceCode;
    }
    public void setData(String data) 
    {
        this.data = data;
    }

    public String getData() 
    {
        return data;
    }
    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }
    public void setErrorReason(String errorReason) 
    {
        this.errorReason = errorReason;
    }

    public String getErrorReason() 
    {
        return errorReason;
    }

    public Long getRetryCnt() {
        return retryCnt;
    }

    public void setRetryCnt(Long retryCnt) {
        this.retryCnt = retryCnt;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("deviceCode", getDeviceCode())
            .append("data", getData())
            .append("status", getStatus())
            .append("errorReason", getErrorReason())
            .append("remark", getRemark())
            .append("retryCnt", getRetryCnt())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
